<template>
	<div class="box">
		<h1>我是School组件</h1>
		<h3>校名:{{name}}</h3>
		<h3>地址:{{address}}</h3>
		<button @click="showInfo">点我提示学校信息</button>
	</div>
</template>

<script>
	export default {
		name:'School',
		data() {
			return {
				name:'尚硅谷',
				address:'宏福科技园'
			}
		},
		methods:{
			showInfo(){
				alert(`${this.name}，坐落于${this.address}`)
			}
		}
	}
</script>1

<style scoped>
	.box{
		background-color: orange;
		padding: 20px;
	}
</style>